package com.ssy.lingxi.pay.api.common;

/**
 * @author jw.chen
 * @version 2.0.0
 * @menu: e账户管理-通联
 * @date 2021/12/2
 */
public enum EAccountPayTypeEnum {
    BALANCE("BALANCE", "余额支付"),
    SCAN_WEIXIN("SCAN_WEIXIN", "微信扫码支付"),
    SCAN_ALIPAY("SCAN_ALIPAY", "支付宝扫码支付"),
    WECHATPAY_MINIPROGRAM_ORG("WECHATPAY_MINIPROGRAM_ORG", "微信小程序支付"),
    WECHATPAY_H5_OPEN("WECHATPAY_H5_OPEN", "h5微信支付"),
    QUICKPAY_VSP("QUICKPAY_VSP", "快捷支付"),
    GATEWAY_VSP("GATEWAY_VSP", "网银支付");

    private String code;
    private String msg;

    EAccountPayTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMessage(String code) {
        EAccountPayTypeEnum[] values = EAccountPayTypeEnum.values();
        for (EAccountPayTypeEnum allInPayPayMethodEnum : values) {
            if (allInPayPayMethodEnum.code.equals(code)) {
                return allInPayPayMethodEnum.msg;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
